package org.jeecg.modules.manage.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;

import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description: 款式资料
 * @Author: jeecg-boot
 * @Date:   2021-09-13
 * @Version: V1.0
 */
@ApiModel(value="style_info对象", description="款式资料")
@Data
@TableName("style_info")
public class StyleInfo implements Serializable {
	
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
    
    /**款图：存数据库的字段*/
    private byte[] styleImage;
    
	/**款图：读取数据的属性*/
    @TableField(exist = false)
    private java.lang.String styleImageString;

    /**款图：Excel导入带图片款式时的图片保存路径*/
    @Excel(name = "款图", type = 2 ,width = 40 , height = 20)
    @TableField(exist = false)
    private java.lang.String styleImagePath;
    
	public byte[] getStyleImage() {
		if ((styleImageString == null || "".equals(styleImageString)) && (styleImagePath == null || "".equals(styleImagePath))) {
			return null;
		}
		try {
			if (styleImageString != null && !"".equals(styleImageString)) {
				return styleImageString.getBytes("UTF-8");

			} else if (styleImagePath != null && !"".equals(styleImagePath)) {
				return styleImagePath.getBytes("UTF-8");
			}
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return null;
	}

	public String getStyleImageString() {
		if (styleImage == null || styleImage.length == 0) {
			return "no_picture.png";
		}
		try {
			return new String(styleImage, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return "";
	}
    
	/**款号*/
	@Excel(name = "款号", width = 15)
    @ApiModelProperty(value = "款号")
    private java.lang.String codeNum;
	
	/**款类*/
	@Excel(name = "款类", width = 15, dicCode = "style_type")
    @Dict(dicCode = "style_type")
    @ApiModelProperty(value = "款类")
    private java.lang.Integer styleCate;
	
	/**款式名称*/
	@Excel(name = "款式名称", width = 15)
    @ApiModelProperty(value = "款式名称")
    private java.lang.String name;
	
	
	/**胶膜号*/
	@Excel(name = "胶膜号", width = 15)
    @ApiModelProperty(value = "胶膜号")
    private java.lang.String modelNum;
	
	/**所属客户*/
	@Excel(name = "所属客户", width = 15, dictTable = "customer_info", dicText = "cus_code", dicCode = "id")
    @Dict(dictTable = "customer_info", dicText = "cus_code", dicCode = "id")
    @ApiModelProperty(value = "所属客户")
    private java.lang.String customerInfoId;
	
	/**净金重（头版金重)*/
	@Excel(name = "净金重", width = 15)
	@ApiModelProperty(value = "净金重")
    private java.math.BigDecimal goldWeight;
	
	/**净银重（银版重）*/
	@Excel(name = "净银重", width = 15)
    @ApiModelProperty(value = "净银重")
    private java.math.BigDecimal silverModelWeight;
	
	/**蜡重（蜡版重）*/
	@Excel(name = "蜡重", width = 15)
    @ApiModelProperty(value = "蜡重")
    private java.math.BigDecimal waxModelWeight;
	
	/**石重*/
    @Excel(name = "石重", width = 15)
    @ApiModelProperty(value = "石重")
    private java.math.BigDecimal pureStoneWeight;
    
    /**连石重*/
    @Excel(name = "连石重", width = 15)
    @ApiModelProperty(value = "连石重")
    private java.math.BigDecimal withStoneWeight;
    
	/**耗率(%)*/
	@Excel(name = "耗率(%)", width = 15)
    @ApiModelProperty(value = "耗率(%)")
    private java.math.BigDecimal attritionRate;
	
	/**工费*/
	@Excel(name = "工费", width = 15)
    @ApiModelProperty(value = "工费")
    private java.math.BigDecimal labourCost;
	
	/**工费*/
	@Excel(name = "电镀费", width = 15)
    @ApiModelProperty(value = "电镀费")
    private java.math.BigDecimal electroplateCost;
	
	/**手寸规格/*/
	@Excel(name = "手寸规格", width = 15)
    @ApiModelProperty(value = "手寸规格")
    private java.lang.String styleSize;
	
	/**手寸规格单位/*/
	@Excel(name = "手寸规格单位", width = 15, dicCode = "style_size_unit")
    @Dict(dicCode = "style_size_unit")
    @ApiModelProperty(value = "手寸规格单位")
    private java.lang.Integer styleSizeUnit;
	
	/**长度*/
	@Excel(name = "长度", width = 15)
    @ApiModelProperty(value = "长度")
    private java.math.BigDecimal length;
	
	/**宽度*/
	@Excel(name = "宽度", width = 15)
    @ApiModelProperty(value = "宽度")
    private java.math.BigDecimal width;
	
	/**难度级别*/
	@Excel(name = "难度级别", width = 15, dicCode = "difficult_level")
    @Dict(dicCode = "difficult_level")
    @ApiModelProperty(value = "难度级别")
    private java.lang.Integer difficultLevel;
	
	/**单价*/
	@Excel(name = "单价", width = 15)
    @ApiModelProperty(value = "单价")
    private java.math.BigDecimal unitPrice;
	
	/**单价(含税)*/
	@Excel(name = "单价(含税)", width = 15)
    @ApiModelProperty(value = "单价(含税)")
    private java.math.BigDecimal unitPriceTax;
	
	/**款式系列*/
	@Excel(name = "款式系列", width = 15)
    @ApiModelProperty(value = "款式系列")
    private java.lang.String styleSeries;
	
	/**生产要求*/
	@Excel(name = "生产要求", width = 15)
    @ApiModelProperty(value = "生产要求")
    private java.lang.String productionRequirement;
	
	/**起版要求*/
	@Excel(name = "起版要求", width = 15)
    @ApiModelProperty(value = "起版要求")
    private java.lang.String platemakingRequirement;
	
	/**烤漆要求*/
	@Excel(name = "烤漆要求", width = 15)
    @ApiModelProperty(value = "烤漆要求")
    private java.lang.String paintRequirement;
	
	/**电镀要求*/
	@Excel(name = "电镀要求", width = 15)
    @ApiModelProperty(value = "电镀要求")
    private java.lang.String electroplateRequirement;
	
	/**包装要求*/
	@Excel(name = "包装要求", width = 15)
    @ApiModelProperty(value = "包装要求")
    private java.lang.String packRequirement;
	
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private java.lang.String remark;
	
	/**设计人*/
    @ApiModelProperty(value = "设计人")
    private java.lang.String designBy;
	
	/**审核人*/
    @ApiModelProperty(value = "审核人")
    private java.lang.String examineBy;
    
	/**审核日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核日期")
    private java.util.Date examineTime;
}
